var express = require('express');
var router = express.Router();

const {
  getAll,
  getAllList,
  insert,
  update,
  queryDetail
} = require("../controller/orders");
const { authFilter } = require("../middlewares/auth");

class OrdersRouter {
  static initRouter() {
    router.get('/', authFilter, getAllList);
    router.post('/0', authFilter, insert);
    router.put('/:id', authFilter, update);
    router.get('/od/:id', authFilter, queryDetail);
    return router;
  }
}
module.exports = OrdersRouter.initRouter();